﻿

namespace OneWorks.Web.Api.Controllers
{
    using Extension;
    using Common;
    using Common.Model;

    public class ImageController : Controller
    {
        private readonly ImageHandle _imageHandle = new ImageHandle();

        public CustomJsonResult Show(FindImageModel model)
        {
            model.PageNumber = model.PageNumber <= 0 ? 1 : model.PageNumber;
            model.PageSize = model.PageSize <= 0 ? 20 : model.PageSize;
            model.DelFlag = false;
            return CustomJson(_imageHandle.GetImages(model));
        }       
    }
}
